from flask import Flask, render_template, jsonify
from analyse_data.analyse_data import *

app = Flask(__name__)


@app.route('/')
def index():
    return render_template('index.html')


@app.route('/bar1')
def bar1():
    return jsonify(bar_data())


@app.route('/bar2')
def bar2():
    return jsonify(unit_type_bar())


@app.route('/pie')
def pie():
    return jsonify(pie_data())


@app.route('/geo')
def geo():
    return jsonify(geo_data())


@app.route('/word_cloud')
def word_cloud():
    return jsonify(word_cloud_data())


@app.route('/boxplot')
def boxplot():
    return jsonify(boxplot_data())


if __name__ == '__main__':
    app.run()
